package anc.server.tankshooter.network;

public class DataPacket {
	final static int COMMANDLENGTH = 4;
	
	private int mValueLength = 0;
	private int mCommand = 0;
	private String mValue = "";
	private byte[] mByte;
	
	public DataPacket(int command, byte[] bytes)
	{
		this.mCommand = command;
		this.mValue = new String(bytes);
		this.mByte = bytes;
	}// CREATE PACKET FOR READ
	
	public DataPacket(int command, String s)
	{
		this.mCommand = command;
		mValue = s;
		this.mByte = s.getBytes();
		mValueLength = mByte.length;
		
	}// CREATE PACKET FOR SEND

	public int getCommand() {
		return mCommand;
	}

	public int getValueLength() {
		return mValueLength;
	}

	public String getValue() {
		return mValue;
	}
	
	public byte[] getBytes()
	{
		return mByte;
	}
	
}
